<?php
/**
 * Created by PhpStorm.
 * User: eric-pc
 * Date: 2019/3/29
 * Time: 2:08
 */

use think\facade\App;
use think\Response;

return [
    //...
/*
    \Slince\Glide\GlideMiddleware::factory([
        'source' => App::getRootPath() . 'public/upload/images',
        'signKey' => '1',
        'glide' => [  // 传递给 glide 的原生参数
            'driver' => 'imagick',
        ],
        'onException' => function(\Exception $exception, $request, $server){
            if ($exception instanceof \League\Glide\Signatures\SignatureException) {
                $response = new Response('签名错误', 403);
            } else {
                $response = new Response(sprintf('你访问的资源 "%s" 不存在', $request->path()), 404);
            }

            return $response;
        }
    ])
*/
];